package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.DeviceDataPageReqDto;
import com.zzyl.dto.DeviceDto;
import com.zzyl.service.DeviceDataService;
import com.zzyl.vo.DeviceDataVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description DeviceDataController
 * @Author apeng
 * @Date 2024-11-02
 */
@RestController
@RequestMapping("/device-data")
@Api("物模型数据")
@RequiredArgsConstructor
public class DeviceDataController extends BaseController{

    private final DeviceDataService deviceDataService;

    @GetMapping("/get-page")
    @ApiOperation("物模型分页查询数据")
    public ResponseResult<PageResponse<DeviceDataVo>> getDeviceDataPage(DeviceDataPageReqDto dto){
        PageResponse<DeviceDataVo> pageResponse =  deviceDataService.getDeviceDataPage(dto);
        return success(pageResponse);
    }


}
